<template>
  <div class="swiper">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in imgArr" :key="index">
        <a href=""><img :src="item" alt="" /></a>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";

Vue.use(Swipe);
Vue.use(SwipeItem);

export default {
  name: "Swiper",
  data() {
    return {
      imgArr: [
        "https://img02.hua.com/slider/21_day0614_m.jpg",
        "https://img02.hua.com/slider/21_birthday_banner_m.jpg",
        "https://img02.hua.com/slider/20_graduation_m.jpg",
      ],
    };
  },
  components: {},
};
</script>
<style lang="scss" scoped>
.swiper {
  width: 351px;
  height: 168px;
  margin: auto;
  img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
  }
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
}
</style>